package com.zq.behavior.observer;

public interface Observer {
    // Object根据自己的需要自己设定
    void update(Object object);
}

class ConcreteObserver1 implements Observer {
    private final String name = ConcreteObserver1.class.getName();

    @Override
    public void update(Object object) {
        System.out.println(name + ":" + object);
    }
}

class ConcreteObserver2 implements Observer {
    private final String name = ConcreteObserver2.class.getName();

    @Override
    public void update(Object object) {
        System.out.println(name + ":" + object);
    }
}
